#include "selectwin.h"
#include "ui_selectwin.h"

SelectWin::SelectWin(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::SelectWin)
{
    ui->setupUi(this);
    userModel = new QSqlTableModel;
    userModel->setTable("userinfo");
    userModel->select();
    ui->userView->setModel(userModel);

    faceModel = new QSqlTableModel;
    faceModel->setTable("checked");
    faceModel->select();
    ui->faceView->setModel(faceModel);

}

SelectWin::~SelectWin()
{
    delete ui;
}

void SelectWin::on_userSelectBt_clicked()
{
    userModel->select();
}

void SelectWin::on_faceSelectBt_clicked()
{
    faceModel->select();
}
